#include <iostream>
#include <stack>
#include <string>
using namespace std;

int main() {
    string s;
    cin >> s;
    int sign = 1;
    while (!s.empty())
    {
        int flag = 0;
        for (int i = 0; i < (int)s.size() - 1; i++)
        {
            if (s[i] == 'a' && s[i + 1] == 'b')
            {
                flag = 1;
                s.erase(i, 2);
            }
        }
        if (flag == 0)
        {
            sign = 0;
            break;
        }
    }
    if (sign == 1)
    {
        cout << "Good" << endl;
    }
    else
    {
        cout << "Bad" << endl;
    }
}
